package oa.test;

import java.sql.SQLException;

import javax.annotation.Resource;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;

@Repository
public class LoginDao {

	@Resource(name = "sqlMapClient")
	private SqlMapClient sqlMapClient;
	
	public void login() {
		Employee emp = null;
		try {
			emp = (Employee) sqlMapClient.queryForObject("employee.test");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("dao: " + emp.getManager().getId() + "||" + emp.getManager().getDept());
	}
	
}
